/**
 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
 * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
 * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package com.navinfo.opentsp.qingqi.trackoptimize.entity;

import java.util.List;

/**
 * Created on 19/1/10 14:43
 * mongo存储的行程信息数据结构
 * @author wangshuai
 */
public class MongoTripDataEntity {

    private String _id="";
    private String _kid = "";
    //通信号
    private String _auto_terminal = "";
    //0点毫秒
    private long _stime;
    private String _start_lon = "";
    private String _start_lat = "";
    private String _end_lon = "";
    private String _end_lat = "";
    private long _start_time = 0;
    private long _end_time = 0;
    private int _start_height = 0;
    private int _end_height = 0;
    private int _start_direction = 0;
    private int _end_direction = 0;
    private long _trip_time = 0;
    //km
    private double _trip_len = 0;
    private double _start_mileage = 0;
    private double _total_mileage = 0;
    private double _start_oil = 0;
    private double _end_oil = 0;
    private double _total_useoil = 0; //L
    private double _avghundoil = 0;//L/100km
    private int _avg_not_idling_speed = 0;//不含怠速平均速度km/h
    private int _avg_speed = 0;//km/h
    private int _max_speed = 0;//速度(km/h)
    private int _fastup_count = 0;
    private int _fastlow_count = 0;
    private int _crook_count = 0;
    private int _remove_count = 0;
    private int _terminal_count = 0;
    private int _tired_count = 0;//疲劳驾驶次数
    private int _speeding_count = 0;//超速次数
    private int _overtime_park_count = 0;//滞留超时次数
    private int _trip_score;//综合得分
    private int _driv_score;//驾驶得分
    private int _driv_score_level;//驾驶打分等级
    private String _drive_suggest = "";//驾驶建议
    private int _oil_score;//油耗打分
    private int _oil_level;//油耗等级
    private String _oil_suggest = "";//油耗建议
    private long _zeroup_time;//怠速时长
    private long _slowspeed_time;
    private long _lowspeed_time;
    private long _midspeed_time;
    private long _highspeed_time;
    private long _overspeed_time;
    private double _slow_km = 0;
    private double _low_km = 0;
    private double _mid_km = 0;
    private double _high_km = 0;
    private double _over_km = 0;
    private long _upload_time;
    private int _trip_flag = 0;//行程结束标志
//    private List<EventMongoEntity> _events;
    /**
     * 跨天标志，0不跨，1跨
     */
    private int _across_flag = 0;

    /**
     * 跨天前段信息
     */
    private AcrossEntity acrossEntity;

    public static double hours(long mss) {

        return (double) mss / (1000 * 60 * 60);
    }

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String get_kid() {
        return _kid;
    }

    public void set_kid(String _kid) {
        this._kid = _kid;
    }

    public String get_auto_terminal() {
        return _auto_terminal;
    }

    public void set_auto_terminal(String _auto_terminal) {
        this._auto_terminal = _auto_terminal;
    }

    public long get_stime() {
        return _stime;
    }

    public void set_stime(long _stime) {
        this._stime = _stime;
    }

    public String get_start_lon() {
        return _start_lon;
    }

    public void set_start_lon(String _start_lon) {
        this._start_lon = _start_lon;
    }

    public String get_start_lat() {
        return _start_lat;
    }

    public void set_start_lat(String _start_lat) {
        this._start_lat = _start_lat;
    }

    public String get_end_lon() {
        return _end_lon;
    }

    public void set_end_lon(String _end_lon) {
        this._end_lon = _end_lon;
    }

    public String get_end_lat() {
        return _end_lat;
    }

    public void set_end_lat(String _end_lat) {
        this._end_lat = _end_lat;
    }

    public long get_start_time() {
        return _start_time;
    }

    public void set_start_time(long _start_time) {
        this._start_time = _start_time;
    }

    public long get_end_time() {
        return _end_time;
    }

    public void set_end_time(long _end_time) {
        this._end_time = _end_time;
    }

    public long get_trip_time() {
        return _trip_time;
    }

    public void set_trip_time(long _trip_time) {
        this._trip_time = _trip_time;
    }

    public double get_trip_len() {
        return _trip_len;
    }

    public void set_trip_len(double _trip_len) {
        this._trip_len = _trip_len;
    }

    public double get_start_mileage() {
        return _start_mileage;
    }

    public void set_start_mileage(double _start_mileage) {
        this._start_mileage = _start_mileage;
    }

    public double get_total_mileage() {
        return _total_mileage;
    }

    public void set_total_mileage(double _total_mileage) {
        this._total_mileage = _total_mileage;
    }

    public double get_start_oil() {
        return _start_oil;
    }

    public void set_start_oil(double _start_oil) {
        this._start_oil = _start_oil;
    }

    public double get_end_oil() {
        return _end_oil;
    }

    public void set_end_oil(double _end_oil) {
        this._end_oil = _end_oil;
    }

    public double get_total_useoil() {
        return _total_useoil;
    }

    public void set_total_useoil(double _total_useoil) {
        this._total_useoil = _total_useoil;
    }

    public int get_start_height() {
        return _start_height;
    }

    public void set_start_height(int _start_height) {
        this._start_height = _start_height;
    }

    public int get_end_height() {
        return _end_height;
    }

    public void set_end_height(int _end_height) {
        this._end_height = _end_height;
    }

    public int get_start_direction() {
        return _start_direction;
    }

    public void set_start_direction(int _start_direction) {
        this._start_direction = _start_direction;
    }

    public int get_end_direction() {
        return _end_direction;
    }

    public void set_end_direction(int _end_direction) {
        this._end_direction = _end_direction;
    }

    public double get_avghundoil() {
        return _avghundoil;
    }

    public void set_avghundoil(double _avghundoil) {
        this._avghundoil = _avghundoil;
    }

    public int get_avg_not_idling_speed() {
        return _avg_not_idling_speed;
    }

    public void set_avg_not_idling_speed(int _avg_not_idling_speed) {
        this._avg_not_idling_speed = _avg_not_idling_speed;
    }

    public int get_avg_speed() {
        return _avg_speed;
    }

    public void set_avg_speed(int _avg_speed) {
        this._avg_speed = _avg_speed;
    }

    public int get_max_speed() {
        return _max_speed;
    }

    public void set_max_speed(int _max_speed) {
        this._max_speed = _max_speed;
    }

    public int get_fastup_count() {
        return _fastup_count;
    }

    public void set_fastup_count(int _fastup_count) {
        this._fastup_count = _fastup_count;
    }

    public int get_fastlow_count() {
        return _fastlow_count;
    }

    public void set_fastlow_count(int _fastlow_count) {
        this._fastlow_count = _fastlow_count;
    }

    public int get_crook_count() {
        return _crook_count;
    }

    public void set_crook_count(int _crook_count) {
        this._crook_count = _crook_count;
    }

    public int get_remove_count() {
        return _remove_count;
    }

    public void set_remove_count(int _remove_count) {
        this._remove_count = _remove_count;
    }

    public int get_terminal_count() {
        return _terminal_count;
    }

    public void set_terminal_count(int _terminal_count) {
        this._terminal_count = _terminal_count;
    }

    public int get_tired_count() {
        return _tired_count;
    }

    public void set_tired_count(int _tired_count) {
        this._tired_count = _tired_count;
    }

    public int get_speeding_count() {
        return _speeding_count;
    }

    public void set_speeding_count(int _speeding_count) {
        this._speeding_count = _speeding_count;
    }

    public int get_overtime_park_count() {
        return _overtime_park_count;
    }

    public void set_overtime_park_count(int _overtime_park_count) {
        this._overtime_park_count = _overtime_park_count;
    }

    public int get_trip_score() {
        return _trip_score;
    }

    public void set_trip_score(int _trip_score) {
        this._trip_score = _trip_score;
    }

    public int get_driv_score() {
        return _driv_score;
    }

    public void set_driv_score(int _driv_score) {
        this._driv_score = _driv_score;
    }

    public int get_driv_score_level() {
        return _driv_score_level;
    }

    public void set_driv_score_level(int _driv_score_level) {
        this._driv_score_level = _driv_score_level;
    }

    public String get_drive_suggest() {
        return _drive_suggest;
    }

    public void set_drive_suggest(String _drive_suggest) {
        this._drive_suggest = _drive_suggest;
    }

    public int get_oil_score() {
        return _oil_score;
    }

    public void set_oil_score(int _oil_score) {
        this._oil_score = _oil_score;
    }

    public int get_oil_level() {
        return _oil_level;
    }

    public void set_oil_level(int _oil_level) {
        this._oil_level = _oil_level;
    }

    public String get_oil_suggest() {
        return _oil_suggest;
    }

    public void set_oil_suggest(String _oil_suggest) {
        this._oil_suggest = _oil_suggest;
    }

    public long get_zeroup_time() {
        return _zeroup_time;
    }

    public void set_zeroup_time(long _zeroup_time) {
        this._zeroup_time = _zeroup_time;
    }

    public long get_slowspeed_time() {
        return _slowspeed_time;
    }

    public void set_slowspeed_time(long _slowspeed_time) {
        this._slowspeed_time = _slowspeed_time;
    }

    public long get_lowspeed_time() {
        return _lowspeed_time;
    }

    public void set_lowspeed_time(long _lowspeed_time) {
        this._lowspeed_time = _lowspeed_time;
    }

    public long get_midspeed_time() {
        return _midspeed_time;
    }

    public void set_midspeed_time(long _midspeed_time) {
        this._midspeed_time = _midspeed_time;
    }

    public long get_highspeed_time() {
        return _highspeed_time;
    }

    public void set_highspeed_time(long _highspeed_time) {
        this._highspeed_time = _highspeed_time;
    }

    public long get_overspeed_time() {
        return _overspeed_time;
    }

    public void set_overspeed_time(long _overspeed_time) {
        this._overspeed_time = _overspeed_time;
    }

    public double get_slow_km() {
        return _slow_km;
    }

    public void set_slow_km(double _slow_km) {
        this._slow_km = _slow_km;
    }

    public double get_low_km() {
        return _low_km;
    }

    public void set_low_km(double _low_km) {
        this._low_km = _low_km;
    }

    public double get_mid_km() {
        return _mid_km;
    }

    public void set_mid_km(double _mid_km) {
        this._mid_km = _mid_km;
    }

    public double get_high_km() {
        return _high_km;
    }

    public void set_high_km(double _high_km) {
        this._high_km = _high_km;
    }

    public double get_over_km() {
        return _over_km;
    }

    public void set_over_km(double _over_km) {
        this._over_km = _over_km;
    }

    public long get_upload_time() {
        return _upload_time;
    }

    public void set_upload_time(long _upload_time) {
        this._upload_time = _upload_time;
    }

//    public List<EventMongoEntity> get_events() {
//        return _events;
//    }
//
//    public void set_events(List<EventMongoEntity> _events) {
//        this._events = _events;
//    }


    public int get_trip_flag() {
        return _trip_flag;
    }

    public void set_trip_flag(int _trip_flag) {
        this._trip_flag = _trip_flag;
    }


    public int get_across_flag() {
        return _across_flag;
    }

    public void set_across_flag(int _across_flag) {
        this._across_flag = _across_flag;
    }

    public AcrossEntity getAcrossEntity() {
        return acrossEntity;
    }

    public void setAcrossEntity(AcrossEntity acrossEntity) {
        this.acrossEntity = acrossEntity;
    }

    @Override
    public String toString() {
        return "MongoTripDataEntity{" +
                "_id='" + _id + '\'' +
                ", _kid='" + _kid + '\'' +
                ", _auto_terminal='" + _auto_terminal + '\'' +
                ", _stime=" + _stime +
                ", _start_lon='" + _start_lon + '\'' +
                ", _start_lat='" + _start_lat + '\'' +
                ", _end_lon='" + _end_lon + '\'' +
                ", _end_lat='" + _end_lat + '\'' +
                ", _start_time=" + _start_time +
                ", _end_time=" + _end_time +
                ", _trip_time=" + _trip_time +
                ", _trip_len=" + _trip_len +
                ", _total_mileage=" + _total_mileage +
                ", _start_oil=" + _start_oil +
                ", _end_oil=" + _end_oil +
                ", _total_useoil=" + _total_useoil +
                ", _avghundoil=" + _avghundoil +
                ", _avg_speed=" + _avg_speed +
                ", _max_speed=" + _max_speed +
                ", _fastup_count=" + _fastup_count +
                ", _fastlow_count=" + _fastlow_count +
                ", _crook_count=" + _crook_count +
                ", _remove_count=" + _remove_count +
                ", _terminal_count=" + _terminal_count +
                ", _tired_count=" + _tired_count +
                ", _speeding_count=" + _speeding_count +
                ", _overtime_park_count=" + _overtime_park_count +
                ", _trip_score=" + _trip_score +
                ", _driv_score=" + _driv_score +
                ", _driv_score_level=" + _driv_score_level +
                ", _drive_suggest='" + _drive_suggest + '\'' +
                ", _oil_score=" + _oil_score +
                ", _oil_level=" + _oil_level +
                ", _oil_suggest='" + _oil_suggest + '\'' +
                ", _zeroup_time=" + _zeroup_time +
                ", _slowspeed_time=" + _slowspeed_time +
                ", _lowspeed_time=" + _lowspeed_time +
                ", _midspeed_time=" + _midspeed_time +
                ", _highspeed_time=" + _highspeed_time +
                ", _overspeed_time=" + _overspeed_time +
                ", _slow_km=" + _slow_km +
                ", _low_km=" + _low_km +
                ", _mid_km=" + _mid_km +
                ", _high_km=" + _high_km +
                ", _over_km=" + _over_km +
                ", _upload_time=" + _upload_time +
                ", _trip_flag=" + _trip_flag +
//                ", _events=" + _events +
                ", acrossEntity=" + acrossEntity +
                '}';
    }
}
